-- GENERATED SPELL FOR [Scholomance Neophyte] --


function spell0_10470(pUnit, Event) --@Fear,n/a--
pUnit:FullCastSpellOnTarget(12542,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10470', 5500, 1)
end

function spell1_10470(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(17165,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10470', 3000, 1)
end

function spell2_10470(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10470', 3000, 1)
end

function Sorts_10470(pUnit, Event)
local choix_sorts_10470 = math.random(0, 2)
if choix_sorts_10470 == 0 then
pUnit:RegisterEvent('spell0_10470', 1, 1)
end
if choix_sorts_10470 == 1 then
pUnit:RegisterEvent('spell1_10470', 1, 1)
end
if choix_sorts_10470 == 2 then
pUnit:RegisterEvent('spell2_10470', 1, 1)
end
end

function mob10470_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10470', math.random(1500, 3000), 1)
end

function mob10470_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10470_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10470_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10470, 1, 'mob10470_Action')
RegisterUnitEvent(10470, 2, 'mob10470_Leave')
RegisterUnitEvent(10470, 3, 'mob10470_Kill')
RegisterUnitEvent(10470, 4, 'mob10470_Die')
